package com.mrd.gtimpframe.repository;

import com.mrd.gtimp.base.entity.Role;
import com.mrd.gtimpframe.entity.Notice;
import com.mrd.gtimpframe.entity.ReceivedNotice;

import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface NoticeMapper {
    int deleteByPrimaryKey(String id);

    int insert(Notice record);

    int insertSelective(Notice record);

    Notice selectByPrimaryKey(String id);

    int updateByPrimaryKeySelective(Notice record);

    int updateByPrimaryKey(Notice record);

    List<Role> selectAllRoles();

    List<Notice> selectPublishingNotices(@Param("newPublish") String newPublish);

    List<Notice> selectByWhereCase(@Param("whereCase") String whereCase, @Param("defaultSort") boolean defaultSort, @Param("roles") List<String> roles);

    int updateBatch(List<Notice> publishingList);

    List<Notice> selectNewNoticeByUserId(@Param("userId") String userId);

    int insertReceivedNotice(@Param("receivedNotices")List<ReceivedNotice> receivedNotices);
}